package myRuleConfig;

import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Data : 2020/11/18 16:17
 * package: myRuleConfig
 * ClassName : myRibbonRuleConfig
 * 描述:
 **/
@Configuration
public class myRibbonRuleConfig {
	
	@Bean //使用随机的负载均衡算法
	public IRule myRandomRule(){
		//return new RandomRule();
		//return new AvailabilityFilteringRule();
		return new MyRule();
	}
}
